<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/jQuery.js" type="text/javascript"></script>
<?php
     //phpinfo();
     session_start();
     include("config/ini.php");
	 if(isset($_POST['submited'])){
	 	$name=$_POST['name'];
		 $pwd=$_POST['pwd'];
		 $sql="select * from user where name='{$name}' and pwd='${pwd}' ";
		 //echo $sql; exit;
		 $exeSql=mysql_query($sql);
		 $user=mysql_fetch_array($exeSql);
		 if($user){
		 	$_SESSION['userid']=$user;
			header("location:sqlStudy.php");
		 }else{
		 	header("location:login.php");
		 }
	 }

     class myClass{
     	private $name="123";
		function test(){
			echo $this->name;
		}
		
     }
	 

?>
<form action="" method="POST">
	<table width="600" align="center">
	   <tr>
	   	  <td>用户名:</td>
	   	  <td><input type="text" name="name" /></td>
	   </tr>
	   <tr>
	   	  <td>密   码:</td>
	   	  <td><input type="password" name="pwd" /></td>
	   </tr>
	   <tr align="center">
	   	  <td colspan="2"><input type="submit" name="submited" value="提交"/></td>
	   </tr>
	</table>
</form>